package com.sy.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

/**
 * @author songyi
 * @date 2020/6/17 0017 21:55
 * @description
 */
@Controller
@RequestMapping("/main")
public class LoginController {

    @RequestMapping("/login")
    public String login(String username, String password, HttpSession session) {
        session.setAttribute("username", username);
        return "redirect:/index.jsp";
    }
}
